package com.zhang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

@Api(tags = "入库详情信息实体类")
@Data
@NoArgsConstructor
@TableName("t_inputinfo")
public class InputInfoBean {

    @ApiModelProperty("入库信息id")
    @TableId(value = "pk_inputInfoId",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("供应商名称")
    @TableField(value = "ii_name")
    private String name;

    @ApiModelProperty("采购员")
    @TableField(value = "ii_person")
    private String person;

    @ApiModelProperty("采购时间")
    @TableField(value = "ii_time")
    private LocalDate time = LocalDate.now();

    @ApiModelProperty("入库订单详情集合")
    @TableField(exist = false)
    private List<InputOrderBean> inputOrderBean;


    public InputInfoBean(String name, String person) {
        this.name = name;
        this.person = person;
    }

    @Override
    public String toString() {
        return "InputInfoBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", person='" + person + '\'' +
                ", time='" + time + '\'' +
//                ", inputOrderBean=" + inputOrderBean +
                '}' + "\n";
    }
}
